define(function(){
    return function(goodsMsg,id,cb){
        let i = 0;
        goodsMsg.some((val,idx)=>{
            i = idx;
            return val.id ===id
        })
        cb(i)
        localStorage.setItem("goodsMsg",JSON.stringify(goodsMsg))
    }
})